{% load helpers %}
{% load form_helpers %}

<div class="modal fade" tabindex="-1" id="saved_view_modal" role="dialog">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">New Saved View</h4>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <form action="{% url 'extras:savedview_add' %}" method="post">
                <div class="modal-body">
                    {% csrf_token %}
                    <div class="row">
                        {% render_field form.name %}
                        <span class="col-lg-3 text-end text-secondary">New Changes</span>
                        <div class="col-lg-9">
                            <pre><code class="language-json">{{ param_dict }}</code></pre>
                        </div>
                        {% render_field form.is_shared %}
                        <input type="hidden" id="view" name="view" value="{{view}}">
                        <input type="hidden" id="params" name="params" value="{{params}}">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="submit" class="btn btn-primary">
                        <span aria-hidden="true" class="mdi mdi-content-save-plus-outline me-4"></span><!--
                        -->Save
                    </button>
                    <button class="btn btn-secondary" data-bs-dismiss="modal" type="button">
                        <span aria-hidden="true" class="mdi mdi-close me-4"></span><!--
                        -->Cancel
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
